package com.kim.module.server;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.zxp.esclientrhl.annotation.EnableESTools;

/**
 * @Project: kim-logs
 * @PackageName: com.kim.module.server
 * @FileName: ModuleApplication.java
 * @Description: The ModuleApplication is...
 * @Author: kimwu
 * @Time: 2020-12-31 14:56:46
 */
@SpringBootApplication
@EnableESTools
public class ModuleApplication {

    public static void main(String[] args) {
        SpringApplication.run(ModuleApplication.class, args);
    }

    @Bean
    @ConditionalOnMissingBean
    public PaginationInterceptor paginationInterceptor() {
        // 开启 count 的 join 优化,只针对 left join !!!
        return new PaginationInterceptor();
    }
}
